.dx-size-default() {
    @GENERIC_LOOKUP_HEIGHT: 36px;
    @GENERIC_LOOKUP_POPUP_CONTENT_TOP: 49px;
    @GENERIC_LOOKUP_POPUP_CONTENT_PADDING: 20px;
    @GENERIC_LOOKUP_LIST_TOP: 70px;

    @GENERIC_LOOKUP_ARROW_MARGIN: -6px;
    @GENERIC_LOOKUP_ARROW_RIGHT: 10px;
    @GENERIC_LOOKUP_ARROW_LEFT: 16px;

    @GENERIC_LOOKUP_INVALID_MESSAGE_FONT_SIZE: 14px;
    @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_HORIZONTAL: 20px;
    @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_TOP: 13px;
    @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_BOTTOM: 12px;
    @GENERIC_LOOKUP_INVALID_MESSAGE_MARGIN_BOTTOM: 20px;
}
.dx-size-compact() {
    @GENERIC_LOOKUP_HEIGHT: 26px;
    @GENERIC_LOOKUP_POPUP_CONTENT_TOP: 36px;
    @GENERIC_LOOKUP_POPUP_CONTENT_PADDING: 10px;
    @GENERIC_LOOKUP_LIST_TOP: 45px;

    @GENERIC_LOOKUP_ARROW_MARGIN: -5px;
    @GENERIC_LOOKUP_ARROW_RIGHT: 5px;
    @GENERIC_LOOKUP_ARROW_LEFT: 11px;

    @GENERIC_LOOKUP_INVALID_MESSAGE_FONT_SIZE: 12px;
    @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_HORIZONTAL: 10px;
    @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_TOP: 7px;
    @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_BOTTOM: 10px;
    @GENERIC_LOOKUP_INVALID_MESSAGE_MARGIN_BOTTOM: 10px;
}
@GENERIC_LOOKUP_FIELD_PADDING:
    @GENERIC_BASE_INLINE_BORDEREDWIDGET_TOP_PADDING
    @GENERIC_BASE_INLINE_BORDEREDWIDGET_INNER_SIZE
    @GENERIC_BASE_INLINE_BORDEREDWIDGET_BOTTOM_PADDING
    @GENERIC_BASE_INLINE_BORDEREDWIDGET_HORIZONTAL_PADDING;
@GENERIC_LOOKUP_FIELD_PADDING_RTL:
    @GENERIC_BASE_INLINE_BORDEREDWIDGET_TOP_PADDING
    @GENERIC_BASE_INLINE_BORDEREDWIDGET_HORIZONTAL_PADDING
    @GENERIC_BASE_INLINE_BORDEREDWIDGET_BOTTOM_PADDING
    @GENERIC_BASE_INLINE_BORDEREDWIDGET_INNER_SIZE;


.dx-lookup {
    height: @GENERIC_LOOKUP_HEIGHT;
    border: 1px solid @texteditor-border-color;
    background: @texteditor-bg;
}

.dx-lookup-field {
    padding: @GENERIC_LOOKUP_FIELD_PADDING;
    font-size: 1em;

    .dx-rtl & {
        padding: @GENERIC_LOOKUP_FIELD_PADDING_RTL;
    }
}

.dx-lookup-arrow {
    .dx-icon-spinnext;
    width: @GENERIC_BASE_INLINE_BORDEREDWIDGET_INNER_SIZE;
    color: @lookup-icon-color;
    .dx-icon-font-centered-sizing(@GENERIC_BASE_ICON_SIZE);
}

.dx-state-readonly .dx-lookup-field:before {
    opacity: .5;
}

.dx-lookup-popup-wrapper {
    .dx-list-item {
        border-top: none;

        &:last-of-type {
            border-bottom: none;
        }
    }

    .dx-list-item-content {
        padding-left: @GENERIC_LOOKUP_POPUP_CONTENT_PADDING;
        padding-right: @GENERIC_LOOKUP_POPUP_CONTENT_PADDING;
    }

    .dx-popup-content {
        top: 0;
        padding: 0;
    }

    .dx-popup-title + .dx-popup-content {
        top: @GENERIC_LOOKUP_POPUP_CONTENT_TOP;
    }
}

.dx-lookup-empty {
    .dx-lookup-field {
        color: @texteditor-placeholder-color;
    }
}

.dx-invalid.dx-lookup .dx-lookup-field:after {
    right: @GENERIC_DROPDOWNEDITOR_INVALID_BADGE_OFFSET;
    .dx-invalid-generic-badge();

    .dx-rtl &,
    .dx-rtl& {
        right: auto;
        left: @GENERIC_DROPDOWNEDITOR_INVALID_BADGE_OFFSET;
    }
}

.dx-lookup-validation-message {
    font-size: @GENERIC_LOOKUP_INVALID_MESSAGE_FONT_SIZE;
    line-height: @GENERIC_LOOKUP_INVALID_MESSAGE_FONT_SIZE;
    padding: @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_TOP @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_HORIZONTAL @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_BOTTOM;
    margin-bottom: @GENERIC_LOOKUP_INVALID_MESSAGE_MARGIN_BOTTOM;
    margin-left: -@GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_HORIZONTAL;
    border-bottom: 1px solid @overlay-border-color;
    color: @lookup-validation-message-color;

    .dx-rtl & {
        margin-right: -@GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_HORIZONTAL;
        margin-left: 0;
    }
}

.dx-lookup-popup-search .dx-list {
    height: calc(~'100% - '@GENERIC_LOOKUP_LIST_TOP);
}

.dx-lookup-search-wrapper {
    padding: @GENERIC_LOOKUP_POPUP_CONTENT_PADDING;
    padding-bottom: @GENERIC_LOOKUP_POPUP_CONTENT_PADDING - 6px;
}

.dx-popup-content {
    &.dx-lookup-invalid {
        padding-top: 0;

        .dx-lookup-validation-message {
            display: inline-block;
        }

        .dx-list {
            top: @GENERIC_LOOKUP_INVALID_MESSAGE_FONT_SIZE + @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_TOP + @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_BOTTOM + 1px;
        }

        .dx-lookup-popup-search & {
            .dx-list {
                top: @GENERIC_LOOKUP_LIST_TOP + @GENERIC_LOOKUP_INVALID_MESSAGE_FONT_SIZE + @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_TOP + @GENERIC_LOOKUP_INVALID_MESSAGE_PADDING_BOTTOM + 1px;
            }
        }
    }
}
